<template>
  <!--  <div >-->
  <div v-loading="loading" class="login">
  </div>
</template>

<script>
import {getOAuthAuthorizeUrl} from "@/api/login";

export default {
  name: "IdaasLogin",
  data() {
    return {
      loading: false,
    };
  },
  created() {
    this.getOAuthAuthorizeUrl();
  },
  methods: {
    //获取重定向地址
    getOAuthAuthorizeUrl() {
      this.loading = true;
      getOAuthAuthorizeUrl().then(res => {
        this.loading = false;
        if (res.msg) {
          location.href = res.msg;
        }
      }).catch(() => {
        this.loading = false;
      });
    },
  }
};
</script>

<style rel="stylesheet/scss" lang="scss">
.login {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  background-image: url("../assets/images/login-background.jpg");
  background-size: cover;
}

.title {
  margin: 0px auto 30px auto;
  text-align: center;
  color: #707070;
}

.login-form {
  border-radius: 6px;
  background: #ffffff;
  width: 400px;
  padding: 25px 25px 5px 25px;

  .el-input {
    height: 38px;

    input {
      height: 38px;
    }
  }

  .input-icon {
    height: 39px;
    width: 14px;
    margin-left: 2px;
  }
}

.login-tip {
  font-size: 13px;
  text-align: center;
  color: #bfbfbf;
}

.login-code {
  width: 33%;
  height: 38px;
  float: right;

  img {
    cursor: pointer;
    vertical-align: middle;
  }
}

.el-login-footer {
  height: 40px;
  line-height: 40px;
  position: fixed;
  bottom: 0;
  width: 100%;
  text-align: center;
  color: #fff;
  font-family: Arial;
  font-size: 12px;
  letter-spacing: 1px;
}

.login-code-img {
  height: 38px;
}
</style>
